<?php 
function view_studio($config,$param){
view_header($config,array(
    'page' => 'studio',
	));
$twitter = (strlen($param['twitter'])>0) ? $param['twitter'] : "";
view_title(
    'CREATIVE STUDIOS',
    'http://placehold.it/100x100&text=CONTACT',
	$config['home_url'].'contact',
    $param['deskripsi']
); ?>
<!--script social media-->
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=147346958657510";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<!--script social media-->

<h2 style="font-size: 48px;">WORKS</h2>
<script type="text/javascript">
var tutup = [];
</script>

<div style="float: left;">
	<?php
	$i = 0;
	foreach($param['works'] as $works){
		?>
		<script type="text/javascript">
		tutup.push(true);
		</script>
		<h3 class="agency subhide">
			<a href="javascript:doubleToggle2(<?php echo $i ?>,'<?php echo $works['idCstudio']; ?>div','desc<?php echo $works['idCstudio']; ?>')"><?php echo $works['works']; ?></a>
		</h3>
		<div id="desc<?php echo $works['idCstudio']; ?>" style="display: none;">
			<div style="float: left;margin: 0 20px 0 0;width: 200px;">
				<div>
		            <div class="fb-like" data-href="http://<?php echo $_SERVER["SERVER_NAME"].$_SERVER['REQUEST_URI']; ?>" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" data-font="segoe ui"></div>
		            <a href="https://twitter.com/share" class="twitter-share-button" data-text="Balerupa Bimbel (http://<?php echo $_SERVER["SERVER_NAME"].$_SERVER['REQUEST_URI']; ?>)" data-via="<?php echo $twitter; ?>" data-related="<?php echo $twitter; ?>">Tweet</a>
		        </div>
				<p style="font-size: 12px;line-height: 125%;margin: 10px 0"><?php echo str_replace("\n", "<br />", $works['deskripsi']); ?></p>
			</div>
			<div style="background-color: #cccccc;float: right;height: 300px;width: 500px;">
			<?php
				if (count($works['slide'])>0){
					view_slide_narrow('slider'.$works['idCstudio'], $works['slide']);
				}
			?>
			</div>
			<div class="clear" style="height: 50px;"></div>
		</div>
		<?php
		$i++;
	}
	?>
</div>

<?php
	if (count($param['slide'])>0){
		view_slide_narrow('slider1', $param['slide']);
	}
?>

<div class="clear"></div>

<?php view_footer_1($config); ?>

<?php
}